﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.ServiceModel.Activation;
using AteneoLibriBusinessLogic.Entities;

namespace AteneoLibri.AteneoLibriServices
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "SearchService" in code, svc and config file together.
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    public class SearchService : ISearchService
    {

        AteneoLibriBusinessLogic.DAL.SearchFacade searchFacade = new AteneoLibriBusinessLogic.DAL.SearchFacade();        

        #region Search

        public List<Book> Search(string query)
        {
            List<Book> results = Utility.Lucene_NET.LuceneFacade.Search(query); //searchFacade.Search(query);
            return results;
        }

        public List<Book> SearchNET(string query)
        {
            List<Book> results = searchFacade.SearchNET(query);
            return results;
        }

        #endregion
    }
}
